Skip to content

fix(cli): preserve symlinks in sandbox upload#2319

Open
loveRhythm1990 wants to merge 1 commit into
NVIDIA:mainfrom
loveRhythm1990:lr90/preserve-symlinks
Open

fix(cli): preserve symlinks in sandbox upload#2319
loveRhythm1990 wants to merge 1 commit into
NVIDIA:mainfrom
loveRhythm1990:lr90/preserve-symlinks

Conversation

@loveRhythm1990

Copy link
Copy Markdown

Summary

Fix standalone openshell sandbox upload so symlink sources, including dangling
symlinks, are preserved instead of being dereferenced or rejected during Git-aware
upload planning. This restores the intended behavior documented in the CLI reference.

Related Issue

Fixes #2309

Changes

  • Route standalone sandbox uploads through the shared upload planning logic.
  • Use symlink-aware metadata checks so dangling symlinks are accepted.
  • Bypass Git filtering for symlink sources, allowing the archive layer to preserve the
    link.
  • Add regression tests covering valid and dangling symlink uploads through the CLI
    command path.
  • Document the symlink-preservation invariant in the upload function.

Testing

  • mise run pre-commit passes
    • All relevant checks passed, but the workspace run encountered an unrelated
      environment-dependent failure in
      proxy::tests::test_forward_public_ip_allowed_without_allowed_ips because
      dns.google resolved to 198.18.1.240.
  • Unit tests added/updated
  • E2E tests added/updated (not applicable; CLI integration regression tests were
    added)

Additional commands run:

  • mise exec -- cargo test -p openshell-cli
  • mise exec -- cargo test -p openshell-cli --test sandbox_upload_integration
  • mise exec -- cargo test -p openshell-cli symlink
  • mise exec -- cargo check -p openshell-cli
  • git diff --check

Checklist

  • Follows Conventional Commits
  • Commits are signed off (DCO)
  • Architecture docs updated (not applicable; this restores already documented
    behavior)

Signed-off-by: lr90 <qiuweimin@matrixorigin.cn>
@copy-pr-bot

copy-pr-bot Bot commented Jul 16, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@github-actions

github-actions Bot commented Jul 16, 2026

Copy link
Copy Markdown

All contributors have signed the DCO ✍️ ✅
Posted by the DCO Assistant Lite bot.

@loveRhythm1990

Copy link
Copy Markdown
Author

I have read the DCO document and I hereby sign the DCO.

@loveRhythm1990

Copy link
Copy Markdown
Author

recheck

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: sandbox upload no longer preserves symlinks (regression from #1595)

1 participant